home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************************************
- #
- # Main.h
- #
- # An extremely basic encoder utility to assist in building all of the various
- # "compiled" resources used by MoofWars. Many of the encoder utilities are actually
- # handled by things in the standard TGraphic class, so the main reason for pre-encoding
- # the graphics is to improve the time to load the graphics in the game.
- #
- #
- # Author: Timothy Carroll
- # Apple Developer Technical Support
- # timc@apple.com
- #
- # Modification History:
- #
- # 8/15/96 TMC Initial Release
- #
- # 2/27/97 TMC Now load app conditionals and error macros from separate files
- #
- # 2/27/97 TMC Conditionally include Metrowerks headers to be more compiler-friendly
- #
- # Copyright © 1996 Apple Computer, Inc., All Rights Reserved
- #
- #
- # You may incorporate this sample code into your applications without
- # restriction, though the sample code has been provided "AS IS" and the
- # responsibility for its operation is 100% yours. However, what you are
- # not permitted to do is to redistribute the source as "DSC Sample Code"
- # after having made changes. If you're going to re-distribute the source,
- # we require that you make it clear in the source that the code was
- # descended from Apple Sample Code, but that you've made changes.
- #
- *************************************************************************************/
-
- #ifndef _MOOFENCODE_
- #define _MOOFENCODE_
-
- #pragma once
-
- #ifdef __MWERKS__
- #include <MacHeadersPPC++>
- #endif
-
- #include <Quickdraw.h>
- #include <QDOffscreen.h>
- #include <Palettes.h>
- #include <DrawSprocket.h>
-
-
- #include "AppConditionals.h"
- #include "Error Macros.h"
-
-
-
-
- /*********************************************************************************
- OTHER NECESSARY HEADERS
- *********************************************************************************/
- #include "Scaling.h"
- #include "TGraphicCollection.h"
-
-
- /*********************************************************************************
- CONSTANTS
- *********************************************************************************/
-
-
- // A few standard colors -- probably should use palette calls instead!
- const RGBColor kWhite = {0xFFFF, 0xFFFF, 0xFFFF};
- const RGBColor kBlack = {0x0000, 0x0000, 0x0000};
- const RGBColor kDarkBlue = {0x0000,0x0000,0x7000};
- const RGBColor kLtGrey = {0xC000,0xC000,0xC000};
- const RGBColor kMediumGrey = {0x7FFF,0x7FFF,0x7FFF};
-
- // The ResID of the application's color table. All of my custom graphics routines use
- // an 8-bit color table and the sprite is encoded to use these colors. The actual variable
- // to hold the color table is declared below.
-
- enum {
- kAppColorTableResID = 128
- };
-
- // Various constants used to load the background tile and sprite graphics.
-
- enum {
- kGridResourceID = 500
- };
-
- enum {
- kPreferredDepth = 8
- };
-
- // We'll use these contants to tailor the Application's behavior.
- enum {
- kEventInterval = 3,
- kNumberOfMasters = 10,
- kSleepTime = 0
- };
-
- // Constants for all the menu functions
- enum
- {
- rMenuBar = 128,
- mAppleMenu = 128,
- iAboutApp = 1,
- mFileMenu = 129,
- iEncodeIcons = 1,
- iEncodePICTs = 2,
- iTriplePICTs = 4,
- iEncodeTiles = 5,
- iQuit = 7
- };
-
- /*********************************************************************************
- Globals
- *********************************************************************************/
-
- // The main color table described above
- extern CTabHandle gAppColorTable;
-
-
- /*********************************************************************************
- Functions
- *********************************************************************************/
-
- OSStatus CopyResource (SInt16 inRes, SInt16 outRes, OSType theType, SInt16 theID);
-
- #endif /* _MOOFENCODE_ */
-
-